﻿<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>源辰小卖部-后台管理</title>
<link rel="short icon" href="../../images/copylogo.png" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="../../easyui/css/easyui.css" />
<link rel="stylesheet" type="text/css" href="../../easyui/css/wu.css" />
<link rel="stylesheet" type="text/css" href="../../easyui/css/icon.css" />
<script type="text/javascript" src="../../easyui/js/jquery-1.12.4.js"></script>
<script type="text/javascript" src="../../easyui/js/jquery.easyui.min.js"></script>
<script type="text/javascript" src="../../easyui/js/easyui-lang-zh_CN.js"></script>
</head>
<body class="easyui-layout">
<!-- begin of header -->
<div class="wu-header" data-options="region:'north',border:false,split:true">
   	<div class="wu-header-left">
    	<h1>源辰小卖部-后台管理</h1>
    </div>
    <div class="wu-header-right">
    	<p><strong class="easyui-tooltip" title="2条未读消息">admin</strong>，欢迎您！</p>
        <p><a href="#">网站首页</a>|<a href="#">支持论坛</a>|<a href="#">帮助中心</a>|<a href="#">安全退出</a></p>
    </div>
</div>
   <!-- end of header -->
   <!-- begin of sidebar -->
<div class="wu-sidebar" data-options="region:'west',split:true,border:true,title:'导航菜单'"> 
   	<div class="easyui-accordion" data-options="border:false,fit:true"> 
       	<div title="用户信息管理" data-options="iconCls:'icon-user-group'" style="padding:5px;">  	
			<ul class="easyui-tree wu-side-tree">
                <li iconCls="icon-group"><a href="javascript:void(0)" data-icon="icon-group" data-link="admin.html" iframe="0">管理员管理</a></li>
                <li iconCls="icon-groupt-edit"><a href="javascript:void(0)" data-icon="icon-group-edit" data-link="member.html" iframe="0">会员信息管理</a></li>
            </ul>
        </div>
       	<div title="商品信息管理" data-options="iconCls:'icon-report-picture'" style="padding:5px;">  	
			<ul class="easyui-tree wu-side-tree">
                <li iconCls="icon-report"><a href="javascript:void(0)" data-icon="icon-report" data-link="types.html" iframe="0">商品类型管理</a></li>
                <li iconCls="icon-report-edit"><a href="javascript:void(0)" data-icon="icon-report-edit" data-link="goods.html" iframe="0">商品信息管理</a></li>
            </ul>
        </div>
       	<div title="订单信息管理" data-options="iconCls:'icon-report-picture'" style="padding:5px;">  	
			<ul class="easyui-tree wu-side-tree">
                <li iconCls="icon-cart-put"><a href="javascript:void(0)" data-icon="icon-report" data-link="order.html" iframe="0">浏览订单信息</a></li>
            </ul>
        </div>
       	<div title="统计报表" data-options="iconCls:'icon-report-picture'" style="padding:5px;">  	
			<ul class="easyui-tree wu-side-tree">
                <li iconCls="icon-chart-curve"><a href="javascript:void(0)" data-icon="icon-report" data-link="report.html" iframe="0">营业额统计</a></li>
                <li iconCls="icon-chart-bar"><a href="javascript:void(0)" data-icon="icon-report-add" data-link="sreport.html" iframe="0">消费统计</a></li>
            </ul>
        </div>
        
        <div title="个人中心" data-options="iconCls:'icon-user'" style="padding:5px;">  	
			<ul class="easyui-tree wu-side-tree">
                <li iconCls="icon-user-earth"><a href="javascript:void(0)" data-icon="icon-user-earth" data-link="user.html" iframe="0">导航标题</a></li>
              
            </ul>
        </div>
    </div>
</div>	
<!-- end of sidebar -->    
<!-- begin of main -->
<div class="wu-main" data-options="region:'center'">
    <div id="wu-tabs" class="easyui-tabs" data-options="border:false,fit:true">  
        <div title="首页" data-options="href:'',closable:false,iconCls:'icon-tip',cls:'pd3'"></div>
    </div>
</div>
<!-- end of main --> 
<!-- begin of footer -->
<div class="wu-footer" data-options="region:'south',border:true,split:true">
   	衡阳市源辰信息科技有限公司 &copy; 版权所有
</div>
<!-- end of footer -->  
<script type="text/javascript">
$(function(){
	$('.wu-side-tree a').bind("click",function(){
		var title = $(this).text();
		var url = $(this).attr('data-link');
		var iconCls = $(this).attr('data-icon');
		var iframe = $(this).attr('iframe')==1?true:false;
		addTab(title,url,iconCls,iframe);
	});	
});

/**
* Name 选项卡初始化
*/
$('#wu-tabs').tabs({
	tools:[{
		iconCls:'icon-reload',
		border:false,
		handler:function(){
			$('#wu-datagrid').datagrid('reload');
		}
	}]
});
	
/**
* Name 添加菜单选项
* Param title 名称
* Param href 链接
* Param iconCls 图标样式
* Param iframe 链接跳转方式（true为iframe，false为href）
*/	
function addTab(title, href, iconCls, iframe){
	var tabPanel = $('#wu-tabs');
	if(!tabPanel.tabs('exists',title)){
		var content = '<iframe scrolling="auto" frameborder="0"  src="'+ href +'" style="width:100%;height:100%;"></iframe>';
		if(iframe){
			tabPanel.tabs('add',{
				title:title,
				content:content,
				iconCls:iconCls,
				fit:true,
				cls:'pd3',
				closable:true
			});
		} else{
			tabPanel.tabs('add',{
				title:title,
				href:href,
				iconCls:iconCls,
				fit:true,
				cls:'pd3',
				closable:true
			});
		}
	} else {
		tabPanel.tabs('select',title);
	}
}
/**
* Name 移除菜单选项
*/
function removeTab(){
	var tabPanel = $('#wu-tabs');
	var tab = tabPanel.tabs('getSelected');
	if (tab){
		var index = tabPanel.tabs('getTabIndex', tab);
		tabPanel.tabs('close', index);
	}
}
</script>
</body>
</html>
